1. Field of the Invention
The present invention relates to a processor and a processor control method, and particularly to a processor having a plurality of subfunctional units configured to be able to execute SIMD operations, and a control method of the processor.
2. Description of the Related Art
Conventionally, there is a microprocessor of a scalar operation type. In a case of a normal microprocessor of the scalar operation type, in order to be able to execute SIMD operations, SIMD operation instructions are added so that the SIMD operations can be executed.
On the other hand, there is also a microprocessor which can execute only the SIMD operation instructions. In a case of such a microprocessor, execution of a scalar operation is performed by an SIMD operation instruction. However, when the scalar operation is executed by the SIMD operation instruction, unnecessary circuit elements also operate, and thus, there is a problem of unnecessary consumption of power.
Consequently, for example, U.S. Pat. No. 6,839,828 has proposed a technique of adding scalar operation instructions to a microprocessor which can execute only the SIMD operation instructions.
Alternatively, for example, U.S. Patent Application Publication No. 2006/0155964, U.S. Patent Application Publication No. 2006/0282646, or U.S. Patent Application Publication No. 2006/0282826 has proposed a technique of providing a mode switching function configured to switch an operation mode in the microprocessor.
However, if the scalar operation instruction is added to the microprocessor, the scalar operation instruction is defined and used in a limited instruction code system. Therefore, there are a problem of consumption of instruction codes and a problem in that software programs which have already been made cannot be taken care of.
Moreover, in order to switch between two modes of the scalar operation and the SIMD operation, there is a problem in that a mode switching instruction or a mode setting register has to be prepared or provided, and furthermore, mode information also needs to be saved when a context switch is done, and thus, an operating system (OS) also needs to be changed.